//
//  MainViewController.h
//  We365
//
//  Created by Bui Thien An on 11/27/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "WeatherInfoViewController.h"
#import "CustomAlertViewController.h"
#import "Category.h"
#import "LocationGotcha.h"

@interface MainViewController : UIViewController <AlertTableViewDelegate, UIAlertViewDelegate, UISearchBarDelegate, LocationGotchaDelegate>{
    
    WeatherInfoViewController   *weather;
    UISearchBar                 *search;
    
    LocationGotcha              *locationGotCha;
    UIAlertView                 *alertGPS;
    UIAlertView                 *alertUpdateLocation;
    
    // Member Variable    
    NSArray                     *arrButton;
    NSMutableArray              *arrDisplay;              // Array Display
    NSMutableArray              *arrAllCateNames;           // Array All Category Name
    NSMutableDictionary         *dictDisplay;               // A Dictionary to Display
    UIButton                    *buttonOne;
    UIButton                    *buttonTwo;
    UIButton                    *buttonThree;
    UIButton                    *buttonFour;
    UIButton                    *buttonFive;
    UIButton                    *buttonSix;
    UIButton                    *buttonSeven;
    UIButton                    *buttonEight;
    UIImageView                 *imageRecycle;
    UIButton                    *buttonTemp;
    Category                    *category;
    NSMutableArray              *arrCateNameDisplayed;
    NSMutableArray              *arrDataAlertView;        // Array Data Alert View
    
        
    int                         indexButtonTouch;
    int                         category_ID;
    NSString                    *category_Name;
    BOOL                        canMove;
    
}
// My Property
@property (nonatomic, retain) Category                  *category;
@property (nonatomic, retain) WeatherInfoViewController *weather;
@property (nonatomic, retain) LocationGotcha            *locationGotCha;
@property (nonatomic, retain) UIAlertView               *alertGPS;
@property (nonatomic, retain) UIAlertView               *alertUpdateLocation;
@property (nonatomic, retain) IBOutlet UISearchBar      *search;
@property (nonatomic, retain) NSMutableArray            *arrDisplay;
@property (nonatomic, retain) NSMutableArray            *arrAllCateNames;
@property (nonatomic, retain) NSArray                   *arrButton;
@property (nonatomic, retain) NSMutableDictionary       *dictDisplay;
@property (nonatomic, retain) IBOutlet UIButton         *buttonOne;
@property (nonatomic, retain) IBOutlet UIButton         *buttonTwo;
@property (nonatomic, retain) IBOutlet UIButton         *buttonThree;
@property (nonatomic, retain) IBOutlet UIButton         *buttonFour;
@property (nonatomic, retain) IBOutlet UIButton         *buttonFive;
@property (nonatomic, retain) IBOutlet UIButton         *buttonSix;
@property (nonatomic, retain) IBOutlet UIButton         *buttonSeven;
@property (nonatomic, retain) IBOutlet UIButton         *buttonEight;
@property (nonatomic, retain) IBOutlet UIImageView      *imageRecycle;
@property (nonatomic, retain) UIButton                  *buttonTemp;
@property (nonatomic, retain) NSMutableArray            *arrCateNameDisplayed;
@property (nonatomic, retain) NSMutableArray            *arrDataAlertView;


// My Action
+ (CLLocation *)getLocation;
+ (void)setLocation:(CLLocation *)location;
- (NSMutableArray *)getAllCateNamesWith:(Category *)category;
- (void)initDisplay;
- (void)getArrCateIDDisplay;
- (void)setButtonBG:(UIButton *)button withBackground:(NSString *)nameBG;
- (NSString *)getCateNameFrom:(int)cateID;
- (void)addCategory;
- (void)removeCategory;
- (void)openCategory;
- (void)pushViewController:(UIViewController *)viewController;
- (IBAction)buttonTapped:(id)sender;
- (NSMutableArray *)getArrCateNameDisplayedFrom:(NSArray *)arrDisplay;
- (int)getCategoryID:(NSString*)categoryName;

@end
